<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="/static/CSS/login.css" type="text/css">
    <script type="text/javascript" src="/static/JS/jquery.js"></script>
    <script type="text/javascript" src="/static/JS/login.js"></script>
    <title>登录页面</title>
</head>
<body>
    <div class="from">
        <div class="div">
            <div class="register div-form">
                <h2>手机验证码登录(不推荐使用)</h2>
                <form action="#">
                    <div class="div-input">
                        <input type="text" required id="verify-phone">
                        <span>手机号</span>
                    </div>
                    <div class="div-input">
                        <input type="text" required id="verify-code">
                        <span>验证码</span>
                    </div>
                    <input type="button" value="获取验证码" th:onclick="getCode([[${uuid}]])" class="input-button button-register">
                    <input type="button" value="登录" th:onclick="login_phone([[${uuid}]])" class="input-button button-register">
                </form>
            </div>
        </div>
        <div class="div">
            <div class="login div-form">
                <h2>密码登录</h2>
                <form action="#">
                    <div class="div-input" required>
                        <input type="text" required id="login-urse">
                        <span>账号</span>
                    </div>
                    <div class="div-input" required>
                        <input type="text" required id="login-password">
                        <span>密码</span>
                    </div>
                    <input type="button" value="登录" th:onclick="login([[${uuid}]])" class="input-button button-login">
                </form>
            </div>
        </div>
        <div class="overlay">
            <div class="button">
                <button class="button-left">前往手机验证码登录</button>
                <button class="button-right">前往密码登录</button>
            </div>
        </div>
    </div>
</body>
<script type="text/javascript">
    const signin = document.querySelector(".button-left");
    const signon = document.querySelector(".button-right");
    const from = document.querySelector(".from");
    signin.addEventListener("click", ()=>{from.classList.add("activate");});
    signon.addEventListener("click", ()=>{from.classList.remove("activate");});
</script>
</html>